package com.das.mechanic_base.widget;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.das.mechanic_base.R;

public class X3AppUpdateDialog extends Dialog {

    private X3AppPrograssView av_view;

    private TextView tv_prograss;

    public X3AppUpdateDialog(@NonNull Context context) {
        super(context, R.style.pointDialog);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setBackgroundDrawable(new BitmapDrawable());
        setContentView(R.layout.x3_app_update_dialog);
        initView();
    }

    private void initView() {
        av_view = findViewById(R.id.av_view);
        tv_prograss = findViewById(R.id.tv_prograss);
    }

    public void setPrograss(int prograss) {
        av_view.setCurrentPrograss(prograss);
        tv_prograss.setText(prograss + "%");
    }

    @Override
    protected void onStart() {
        super.onStart();
    }
}
